package com.orangeforms.webadmin.upms.dao;

import com.orangeforms.common.core.base.dao.BaseDaoMapper;
import com.orangeforms.webadmin.upms.model.BusinessCollection;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author：howlrou
 * @Date：2024/8/2 14:52
 */
public interface BusinessCollectionMapper extends BaseDaoMapper<BusinessCollection> {
    /**
     * 查询藏品详情
     *
     * @param collectionId 藏品详情主键
     * @return 藏品详情
     */
    public BusinessCollection selectBusinessCollectionByCollectionId(Long collectionId);

    /**
     * 获取过滤后的对象列表。
     *
     * @param businessCollection 主表过滤对象。
     * @param orderBy            排序字符串，order by从句的参数。
     * @return 对象列表。
     */
    public List<BusinessCollection> selectBusinessCollectionList(
            @Param("businessCollectionFilter") BusinessCollection businessCollection, @Param("orderBy") String orderBy);

    /**
     * 新增藏品详情
     *
     * @param businessCollection 藏品详情
     * @return 结果
     */
    public int insertBusinessCollection(BusinessCollection businessCollection);

    /**
     * 修改藏品详情
     *
     * @param businessCollection 藏品详情
     * @return 结果
     */
    public int updateBusinessCollection(BusinessCollection businessCollection);

    /**
     * 删除藏品详情
     *
     * @param collectionId 藏品详情主键
     * @return 结果
     */
    public int deleteBusinessCollectionByCollectionId(Long collectionId);

    /**
     * 批量删除藏品详情
     *
     * @param collectionIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBusinessCollectionByCollectionIds(Long[] collectionIds);

    /**
     * 通过藏品id获取馆藏号
     *
     * @param collectionId
     * @return
     */
    String selectEnterById(Long collectionId);
}
